<template>
  <app-top-nav></app-top-nav>
  <app-header></app-header>
  <AppHeaderSticky></AppHeaderSticky>
  <slot></slot>
  <app-footer></app-footer>
</template>

<script>
import AppFooter from "@/components/AppFooter";
import AppTopNav from "@/components/AppTopNav";
import AppHeader from "@/components/AppHeader";
import { useStore } from "vuex";
import AppHeaderSticky from "@/components/AppHeaderSticky";
export default {
  name: "AppLayout.vue",
  components: { AppHeaderSticky, AppHeader, AppTopNav, AppFooter },
  setup() {
    const store = useStore();
    // 获取分类数据 存在vuex中
    store.dispatch("category/getCategories");
  },
};
</script>

<style scoped></style>
